<?php
$s = "";
?>
<table cellspacing="0" cellpadding="0" class="tblborder" width="100%">
  <tr class="tblhead">
    <td> - </td>
    <?php
		  foreach ($this->roles as $role):
			?>
    <td><?php echo $role; ?> </td>
    <?php
			endforeach;
			?>
    <td> 全选 </td>
  </tr>
  <?php

foreach ($this->resources as $resource):
$s .= getSlaveMasterCheckBoxes($resource, $this->roles);
	?>
  <tr class="tblbody">
    <td><?php echo $meta['ACL']['resources'][$resource]; ?> </td>
    <?php
		  foreach ($this->roles as $role):
			?>
    <td><input type="checkbox" name="fields[resource][<?php echo $resource; ?>][]" id="fields_resource_<?php echo $resource; ?>__<?php echo $role; ?>" value="<?php echo $role; ?>" checked="true"/>
    </td>
    <?php
			endforeach;
			?>
    <td><input type="checkbox" name="fields[resource][<?php echo $resource; ?>][]" id="fields_resource_<?php echo $resource; ?>__ALL" value="ALL" checked="true" />
    </td>
  </tr>
<?php
	endforeach;
?>
<tr class="tblfoot">
<td colspan="10"><input type="submit" value="提交"/>   </td>
</tr>
</table>
  <script type="text/javascript">
<!--
<?php
echo $s;
?>
//-->
</script>